<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>基础语法</title>
  <!--      # 后接的是div标签里的id,
            . 后接class名
  选择器{
        属性名1:属性值;
        属性名2:属性值2;
        ...
        }       -->
    <style>
        /*内联样式:在页面的style标签中写样式,作用于标签*/
        #box1{
            width: 150px;
            height: 150px;
            border: 2px solid black;/*边框大小,颜色*/
            background-color: grey;/*背景颜色*/
            color: aquamarine;/*字体颜色*/
        }
    </style>
    <link rel="stylesheet" href="../css/style.css">
</head>
<body>
<div id="box1" class="box">我是盒子1</div>
<br>
<!--内部样式,直接在标签上写样式-->
<div id="box2" style="width: 100px;height: 100px;border: 2px solid black;background-color: aqua;color: mediumvioletred;" >我是盒子2</div>
<br>
<div id="box3">我是盒子3</div>
</body>
</html>
